package com.findMoneyGame.pages.game {
	import flash.events.Event;

	import com.findMoneyGame.interfaceComponents.MyButton;
	import com.findMoneyGame.interfaceComponents.MoneyLabel;
	import com.findMoneyGame.tools.TextFormatProvider;
	
	
	public class PriceButton extends MyButton {
		public function set price (value : int) {
			var moneyLabelInst = getMoneyLabel();
			moneyLabelInst ? moneyLabelInst.text = value.toString() : '';
		}

		public function PriceButton (price : int = 0) {
			var moneyLabelInst = getMoneyLabel();
			if (moneyLabelInst != null) {
				moneyLabelInst.color = 0xFFFFFF;
				moneyLabelInst.text = price;
			}
		}
		public function getMoneyLabel () { return getChildByName('moneyLabel') as MoneyLabel; }
	}
	
}
